package com.sohu.peak.gallery.domain;

import java.util.List;

import com.sohu.peak.gallery.dao.OrignDAO;
import com.sohu.peak.gallery.dao.hibernate.OrignHibernateDAO;

public class SimpleCache {
	static List<Orign> orignList;

	public static synchronized List<Orign> getOrignList() {
		if(orignList==null){
			initOrignList();
		}
		return orignList;
	}
	
	public static void initOrignList() {
		OrignDAO orignDao = new OrignHibernateDAO();
		orignList = orignDao.findAll(1);
	}
}
